package com.cn;

import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;

@SpringBootApplication
public class AliPayDemoApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(AliPayDemoApplication.class, args);
        final Environment environment = context.getEnvironment();
        final String port = environment.getProperty("local.server.port");
        LoggerFactory.getLogger(AliPayDemoApplication.class).info("项目启动成功,API地址: http://localhost:{}", port+"/doc.html");
    }

}
